var app = getApp();
Page({
    data: {
        worktype:[{
            'worktypename':'平面设计',
            'worktypeid':1
        },
        {
            'worktypename':'文案排版',
            'worktypeid':2
        },
        {
            'worktypename':'转发阅读',
            'worktypeid':3
        }],
        current:0,
        url: "",
        workimg:'/hyb_jianzhi/images/upwork1.jpg'
    },
    onLoad: function(n) {
        var self = this;
        app.util.request({
            url: "entry/wxapp/url",
              success: function(a) {
                  self.setData({
                      url: a.data
                   });
                    }
                });
    },
      choosePhoto: function() {
        var t = this;
        wx.chooseImage({
            count: 1,
            sizeType: [ "original", "compressed" ],
            sourceType: [ "album", "camera" ],
            success: function(a) {
                var e = a.tempFilePaths[0];
                wx.uploadFile({
                    url: t.data.url + "app/index.php?i=" + app.siteInfo.uniacid + "&c=entry&a=wxapp&do=upload&m=hyb_jianzhi",
                    filePath: e,
                    name: "upfile",
                    formData: {},
                    success: function(a) {
                        t.setData({
                            workimg: a.data
                        });
                    }
                });
            }
        });
    },
    hdlchosetype:function(n) {
        var e = this;
        var t = n.currentTarget.dataset.index;
        e.setData({
            current: t
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});